import _thread
import redis

def getNum(redis,key):
	num = redis.lpop(key)
	print(num)

	
try:
	r = redis.Redis(host='172.16.40.70', port=6379, db=15)
	# 执行监控
	_thread.start_new_thread(getNum,(r,'nums'))
	#print(num ,type(num))
except:
	print("线程启动失败")